import request from '@/utils/httpRequest'

export function login(data) {
  return request({
    url: '/sys/login',
    method: 'post',
    data
  })
}

export function getUserList(params) {
  return request({
    url: '/sys/user/list',
    method: 'get',
    params
  })
}

export function deleteUsers(userIds) {
  return request({
    url: '/sys/user/delete',
    method: 'post',
    data: userIds
  })
}

export function getRoles(params) {
  return request({
    url: '/sys/role/select',
    method: 'get',
    params
  })
}

export function getUserInfo(userId, params) {
  return request({
    url: `/sys/user/info/${userId}`,
    method: 'get',
    params
  })
}
